%# -*- coding:utf-8 -*-
\documentclass[fancyhdr,fntef,10pt]{ctexbook}
\input{configs}
%\usepackage{floatrow}
\usepackage{layout}
\begin{document}

\begin{tikzpicture}
\tikzset{
every pin/.style={fill=yellow!50!white,rectangle,rounded corners=2pt,inner sep=2pt,font=\it\tiny},
small dot/.style={fill=black,circle,scale=0.3}
}
\begin{axis}[
	xmin=0,xmax=22,ymin=0,ymax=22,
	width=.6\linewidth,height=.6\linewidth,
	xlabel style={below},xlabel=$X$,
	ylabel style={left},ylabel=$Y$,
	extra x ticks={6.67,13.333,20},
	extra x tick style={tickwidth=0},
	extra x tick labels={{\tiny$I/{P'_x}$},{\tiny$m'/P_x$},{\tiny$m/{P_x}$}},
	extra y ticks={13.333,20},
	extra y tick style={tickwidth=0},
	extra y tick labels={\tiny$m'/P_y$,\tiny$m/P_y$},
	domain=0:24,samples=40]
\addplot[blueL,ultra thick,domain=20/9:15]
		{100/(3*x)};
\addplot[gray,ultra thick,domain=80/27:15]
		{400/(9*x)};						%斯拉茨基替代
\addplot[blue,ultra thick,domain=20/3:15]
		{100/x};	
\addplot[red,domain=0:24]
		{20-x};	%原始价格下的预算线
\addplot[redL,domain=0:24]
		{20-3*x};	%涨价之后的预算线
\addplot[gray,dashed,domain=0:40/3]
		{40/3-x};
\addplot[only marks,forget plot,black,mark options={mark size=1.25pt,fill=white},mark=*] coordinates {
	(10,10)
	(20/3,20/3)
	(10/3,10)};

\addplot[very thin,gray] coordinates {
	(20/3,20/3) (20/3,0)};
\addplot[very thin,gray] coordinates {
	(10,10) (10,0)};
\addplot[very thin,gray] coordinates {
	(10/3,10) (10/3,0)};
\node[left,font=\tiny] at (axis cs:3.33,10) {$A$};
\node[above,font=\tiny] at (axis cs:6.67,6.67) {$M$};
\node[above,font=\tiny] at (axis cs:10,10) {$B$};

\node [fill=blueL,text=white,single arrow,draw=none,single arrow head extend=2pt,inner sep=1pt] at (axis cs:4.8,2) {\tiny 替代效应};
\node [fill=blue,text=white,single arrow,draw=none,single arrow head extend=2pt,inner sep=1pt] at (axis cs:8.15,2) {\tiny 收入效应};

\end{axis}
\end{tikzpicture}

\end{document}
